import request from '@/utils/request.js'
export const  articleCategoryListService=()=>{
    return request.get('/category');
}

export const addArticleCategory=(categoryDto)=>{
 return request.post('/category',categoryDto);
}
//查看文章分类详情
export const updateArticleDisplayService=(id)=>{
    return request.get('/category/detail?id='+id)
}
//修改分类
export const articleCategoryUpdateService = (categoryModel)=>{
    return request.put('/category',categoryModel)
    }

//删除分类
export const deleteCategoryService=(id)=>{
   return request.delete('/category?id='+id);
}


//文章列表查询
export const articleListService = (params) => {
    return request.get('/article', { params: params })
}


//添加文章
export const articleAddService = (articleModel)=>{
    return request.post('/article',articleModel)
}

//文章页面回显
export const display=(id)=>{
   return request.get('/article/detail?id='+id);
}
//修改文章
export const updateArticleService=(articleModel)=>{
   return request.put('/article',articleModel);
}

export const deleteArticle=(id)=>{
       return request.delete('/article?id='+id)
}